<?
$ticket_list=select_lines_all_items($table_Prefix."ticket","","equipmentid = '".$detail['nid']."' order by ticketdate desc,nid desc","");?>



<table class="layui-table">
    <colgroup>
        <col width="60">
        <col width="100">
        <col >
        <col >
        <col >
        <col >
        <col >
        <col >
        <col width="230">

        <col>
    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>车牌</th>
        <th>罚单日期</th>
        <th>罚单金额</th>
        <th>记分</th>
        <th>责任人</th>
        <th>状态</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>


    <?php
    for ($i = 0; $i < count($ticket_list); $i++) {
        ?>

        <?$chepai=select_one_line_all_items($table_Prefix."equipment","nid = '".$ticket_list[$i]['equipmentid']."'");?>


        <tr>
            <td><?echo $i+1 ?></td>
            <td><?echo $chepai['name']?></td>
            <td><?echo substr($ticket_list[$i]['ticketdate'],0,10)?></td>
            <td><?echo $ticket_list[$i]['cost']?></td>
            <td><?echo $ticket_list[$i]["mark"]?></td>



            <?$principal=select_one_line_all_items($table_Prefix."employee","nid = '".$ticket_list[$i]['principal']."'");?>
            <td><?echo $principal['name']?></td>


            <td><?echo $ticket_list[$i]['status']?></td>
            <td><?echo $ticket_list[$i]['remark']?></td>


            <td>
                <a href="../ticket/detail-edit.php?nav-itemed=<?echo $system_part?>&nid=<? echo $ticket_list[$i]['nid']?>" class="layui-btn layui-btn-primary layui-btn-small" >
                    <i class="layui-icon">&#xe642;</i>编辑
                </a>

            </td>
        </tr>
        <?php

    }
    ?>


    </tbody>
</table>